<?php
namespace Admin\Controller;
use Think\Controller;
class CheckInfoController extends Controller {
    public function checkinfo(){
        isMyCookie();
        isLogin();
        
        $Info=D('Home/Info');
        
        
        //$field=$Info->getInfoField();
        
        $where["id"]=$_POST['id'];
        //var_dump($where);exit();
        $data['checkstate']=1;
        //$count=$Info->count();
        //$Page=getMyPage($count,10);
        //$show=$Page->show();
       // $list=$Info->field($field)->order('edate desc')->limit($Page->firstRow.','.$Page->listRows)->select();
        
        //$this->assign('page',$show);
        //$this->assign('list',$list);
        
        //$this->display();
        if ($Info->where($where)->save($data)>0){
            echo "审核通过";
        }else {
            echo "已审核";
        }
    }
    
    public function checkinfoAll(){
        
        isMyCookie();
        isLogin();
        
        $Info=D('Home/Info');
    
    
        //$field=$Info->getInfoField();
        $ids=$_POST['id'];
         $where["id"]=array('in',$ids);
        //var_dump($where);exit();
        $data['checkstate']=1;
        //$count=$Info->count();
        //$Page=getMyPage($count,10);
        //$show=$Page->show();
        // $list=$Info->field($field)->order('edate desc')->limit($Page->firstRow.','.$Page->listRows)->select();
    
        //$this->assign('page',$show);
        //$this->assign('list',$list);
    
        //$this->display();
        if ($Info->where($where)->save($data)>0){
            echo "审核通过";
        }else {
            echo "已审核";
        }
    }
}